<?php 
session_cache_expire(999999999);
if(!isset($_SESSION)) 
{ 
	session_start(); 
}
include '../operations/connection.php';	

$listreference=$_SESSION['listreference3'];
$namereference=$_SESSION['namereference3'];
$i=$_SESSION['slreference3'];

mysql_query("DELETE FROM `list_sendmailpay`");

for ($j=0;$j<$i;$j++){
	mysql_query("INSERT INTO `list_sendmailpay` (`employee_id`) VALUES ('".$listreference[$j]."')");
}

mysql_close($connection);
?>